package vistas;

//345678901234567890123456789012345678901234567890123456789012345678901234567890

import javax.swing.*;
import java.awt.*;
import modelo.*;

public class RenderPista implements IRenderizable {

	private Lienzo lienzo;
	
	private int longPista;
	private int alturaMascara;
	private int alturaAuto;
	private double posMascara;
	
	public RenderPista(Lienzo lienzo) {
		
		this.lienzo = lienzo;
//		this.longPista = Juego.getInstanciaPartida().getPista().getLongPista();
	}
	
	public void setPosMascara(double d) {
		
		posMascara = d;
		
	}
	
	public void render(Graphics dbg) {
		
		//int divisor = (int) (posMascara / (lienzo.getAlto() + 50));
		//int rel = posMascara - (divisor * (lienzo.getAlto() + 50));
		int divisor = (int) (posMascara / 60);
		double rel = posMascara - (divisor * 60);
		//System.out.println(divisor + "; " + rel);
		dbg.setColor(Color.WHITE);
  	  	for (int i = 0; i < 10; i++) {
  	  		dbg.fill3DRect(60, (int) ((rel - 50) + (i * 60)), 10, 50, false);
  	  		dbg.fill3DRect(240, (int) ((rel - 50) + (i * 60)), 10, 50, false);
  	  	}
  	  	
	}
	
	
}
